# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-plasma
maintainer="team/kde <bribbers@disroot.org>"
pkgname=print-manager
pkgver=6.2.3
pkgrel=0
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://www.kde.org/applications/utilities/"
pkgdesc="A tool for managing print jobs and printers"
license="GPL-2.0-or-later"
makedepends="
	cups-dev
	extra-cmake-modules
	kcmutils-dev
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	kdbusaddons-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kirigami-addons-dev
	knotifications-dev
	kwidgetsaddons-dev
	kwindowsystem-dev
	libplasma-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	samurai
	"
subpackages="$pkgname-lang"

case "$pkgver" in
	*.90*) _rel=unstable;;
	*) _rel=stable;;
esac
_repo_url="https://invent.kde.org/utilities/print-manager.git"
source="https://download.kde.org/$_rel/plasma/$pkgver/print-manager-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3bd0e91cc9f1094c2cd2052d2eaf4bf1c3cc16d096dd5b1317dcc80b012dff39123e20acb8028b54f77f75d14695f3214b081ae7ed76c2ec87feb7e93ef8c202  print-manager-6.2.3.tar.xz
"
